Skip to content

Fix: email format#5714

Open
abdulaba wants to merge 1 commit into
heartcombo:mainfrom
abdulaba:email-validation
Open

Fix: email format#5714
abdulaba wants to merge 1 commit into
heartcombo:mainfrom
abdulaba:email-validation

Conversation

@abdulaba

Copy link
Copy Markdown

Problem: You can register an invalid email: john.doe@gmail
Fix: Regular expresion

devise.rb

@@email_regexp = /\A[^@\s]+@[^@\s]+.[^@\s]+\z/

@rafaeldev

Copy link
Copy Markdown

Hi @abdulaba !

I figured out this point and I fixed it in devise.rb config file with:
config.email_regexp = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i

I don't remember where I saw it, but that default simple validation is for solving some local case emails

@abdulaba

abdulaba commented Sep 23, 2024 via email

Copy link
Copy Markdown
Author

@carlosantoniodasilva carlosantoniodasilva added this to the 5.1.0 milestone Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants